﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Manager/Views/Shared/ManagerLayout.cshtml";
}

<title>回复留言</title>
<article class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-20">
    </div>
    <form class="form form-horizontal" id="form1">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>标题：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="" placeholder="请输入标题" required id="Title" name="Title">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">接收编号：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="@ViewBag.usercode" placeholder="接收编号" readonly="readonly" id="ReciveCode" name="ReciveCode">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">具体内容：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea class="textarea" name="MContent" required placeholder="具体内容" rows="3" id="MContent"></textarea>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交</button>
            </div>
        </div>
    </form>
</article>

<script type="text/javascript">
$('#form1').on('submit', function () {
    formPost()
})
function formPost() {
    //加载层
    var index = layer.load(1, {
        shade: [0.1, '#fff']
    });
    $.ajax({
        type: "post",
        url: "/Manager/MessageManage/SendMessage",
        data: $('#form1').serialize(),
    }).success(function (message) {
        layer.msg('成功', { icon: 1 });
    }).fail(function (err) {
        console.log(err);
        layer.msg('系统错误,请稍后重试!', { icon: 2 });
    })
    layer.close(index)//关闭加载层
}
</script>

